
USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEGSBatchControlRecords]    Script Date: 4/4/13 9:35:17 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
--F0011

CREATE TABLE [dbo].[JDEGSBatchControlRecords](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](20) NOT NULL,
	[BatchType] [nchar](2) NOT NULL,
	[BatchNumber] [int] NOT NULL,
	[BatchStatus] [nchar](1) NOT NULL,
	[BatchApprovedforPosting] [nchar](1) NOT NULL,
	[InputTotal] [decimal](20, 7) NOT NULL,
	[UserID] [nchar](10) NOT NULL,
	[BatchDate] [datetime] NOT NULL,
	[AmountNumberDocumentExpected] [int] NOT NULL,
	[BalancedDocumentsandAmounts] [nchar](1) NOT NULL,
	[BalancedJE] [nchar](1) NOT NULL,
	[AmountEntered] [decimal](20, 7) NOT NULL,
	[AmountDocumentsEntered] [decimal](20, 7) NOT NULL,
	[AuthorizedUserID] [nchar](10) NOT NULL,
	[PostOutofBalance] [nchar](1) NOT NULL,
	[IncludeBatchonIntegrityflag] [nchar](1) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[TimeUpdated] [int] NOT NULL,
	[ProgramID] [nchar](10) NOT NULL,
	[WorkStationID] [nchar](10) NOT NULL,
	[AutoOffsetMode] [nchar](1) NOT NULL,
	[AmountInputTotal] [decimal](20, 7) NOT NULL,
	[DetailedRestatementProcessed] [nchar](1) NOT NULL,
	[CashBasisProcessed] [nchar](1) NOT NULL,
	[52PeriodProcessed] [nchar](1) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDEGSBatchControlRecords] PRIMARY KEY CLUSTERED 
(
	[BatchType] ASC,
	[BatchNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO



-- F30026


USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEPDItemCostComponent]    Script Date: 4/4/13 9:35:44 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[JDEPDItemCostComponent](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](20) NOT NULL,
	[ItemNumber] [int] NOT NULL,
	[ItemNumber02] [nchar](25) NOT NULL,
	[ItemNumber03] [nchar](25) NOT NULL,
	[Branch] [nchar](12) NOT NULL,
	[Location] [nchar](20) NOT NULL,
	[LotNumber] [nchar](30) NOT NULL,
	[CostMethodCode] [nchar](2) NOT NULL,
	[CostType] [nchar](3) NOT NULL,
	[LotGrade] [nchar](3) NOT NULL,
	[ManufacturedCostFrozen] [decimal](20, 7) NOT NULL,
	[ManufacturedCostSimulated] [decimal](20, 7) NOT NULL,
	[CostRollupFrozen] [decimal](20, 7) NOT NULL,
	[CostRollupSimulated] [decimal](20, 7) NOT NULL,
	[FactorCodeFrozen] [nchar](4) NOT NULL,
	[FactorCodeSimulated] [nchar](4) NOT NULL,
	[FactorFrozen] [decimal](15, 4) NOT NULL,
	[FactorSimulated] [decimal](15, 4) NOT NULL,
	[RateCodeFrozen] [nchar](4) NOT NULL,
	[RateCodeSimulated] [nchar](4) NOT NULL,
	[RateFrozen] [decimal](20, 7) NOT NULL,
	[RateSimulated] [decimal](20, 7) NOT NULL,
	[ProcessingFlag] [nchar](1) NOT NULL,
	[UserID] [nchar](10) NOT NULL,
	[ProgramID] [nchar](10) NOT NULL,
	[WorkStationID] [nchar](10) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[TimeOfDay] [int] NOT NULL,
	[SequenceNumberOperations] [decimal](20, 7) NOT NULL,
	[AlternateWorkCenter] [nchar](24) NOT NULL,
	[WorkcenterBranch] [nchar](24) NOT NULL,
	[AccountLevelofDetail] [nchar](2) NOT NULL,
	[TypeBillofMaterial] [nchar](6) NOT NULL,
	[QuantityAccountingCost] [int] NOT NULL,
	[DetailFlag] [nchar](2) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDEPDItemCostComponent] PRIMARY KEY CLUSTERED 
(
	[ItemNumber] ASC,
	[Branch] ASC,
	[Location] ASC,
	[LotNumber] ASC,
	[CostMethodCode] ASC,
	[CostType] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO

--F3106

USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDESFWOCrossReferenceFile]    Script Date: 4/4/13 9:49:11 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[JDESFWOCrossReferenceFile](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](20) NOT NULL,
	[OrderNumber] [int] NOT NULL,
	[DocumentNumber] [int] NOT NULL,
	[DocumentType] [nchar](2) NOT NULL,
	[GLDate] [datetime] NOT NULL,
	[BatchNumber] [int] NOT NULL,
	[BatchType] [nchar](2) NOT NULL,
	[BatchDate] [datetime] NOT NULL,
	[UserID] [nchar](10) NOT NULL,
	[ProgramID] [nchar](10) NOT NULL,
	[WorkStationID] [nchar](10) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[TimeOfDay] [int] NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDESFWOCrossReferenceFile] PRIMARY KEY CLUSTERED 
(
	[OrderNumber] ASC,
	[DocumentNumber] ASC,
	[GLDate] ASC,
	[BatchType] ASC,
	[UserID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


--F4095


USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEIBDistributionMFGAAIValue]    Script Date: 4/4/13 9:49:42 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[JDEIBDistributionMFGAAIValue](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](20) NOT NULL,
	[NumberAAITableNumber] [int] NOT NULL,
	[CompanyNumber] [nchar](5) NOT NULL,
	[OrderTypeCode] [nchar](2) NOT NULL,
	[DocumentType] [nchar](2) NOT NULL,
	[GLCategory] [nchar](4) NOT NULL,
	[CostType] [nchar](3) NOT NULL,
	[BusinessUnitCode] [nchar](12) NOT NULL,
	[ObjectAccount] [nchar](6) NOT NULL,
	[Subsidiary] [nchar](8) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDEIBDistributionManufacturingAAIValues] PRIMARY KEY CLUSTERED 
(
	[NumberAAITableNumber] ASC,
	[CompanyNumber] ASC,
	[OrderTypeCode] ASC,
	[DocumentType] ASC,
	[GLCategory] ASC,
	[CostType] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

--F41003


USE [RD_DWCR]
GO

/****** Object:  Table [dbo].[JDEINUOMstandardConversion]    Script Date: 4/4/13 9:50:21 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[JDEINUOMstandardConversion](
	[SourceID] [int] NOT NULL,
	[Source] [nchar](20) NOT NULL,
	[UnitOfMeasure] [nchar](2) NOT NULL,
	[RelatedUnitOfMeasure] [nchar](2) NOT NULL,
	[ConversionFactor] [decimal](20, 7) NOT NULL,
	[UserID] [nchar](10) NOT NULL,
	[ProgramID] [nchar](10) NOT NULL,
	[WorkStationID] [nchar](10) NOT NULL,
	[DateUpdated] [datetime] NOT NULL,
	[TimeOfDay] [int] NOT NULL,
	[ExcludefromPO] [nchar](2) NOT NULL,
	[ExcludefromSO] [nchar](2) NOT NULL,
	[InsertIndicator] [int] NOT NULL,
	[InsertDate] [datetime] NOT NULL,
	[ChangeIndicator] [int] NOT NULL,
	[ChangeDate] [datetime] NOT NULL,
	[DeleteIndicator] [int] NOT NULL,
	[DeleteDate] [datetime] NOT NULL,
	[PurgeDate] [datetime] NOT NULL,
 CONSTRAINT [PK_JDEINUOMStandardConversion] PRIMARY KEY CLUSTERED 
(
	[UnitOfMeasure] ASC,
	[RelatedUnitOfMeasure] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO



